﻿using Game.Actions;
using Game.Common;
using Game.Objects;

namespace Game.Command.Internal
{
    public class CaptureCommand : GameCommand
    {
        readonly GameBuilding _GameBuilding;
        readonly Vehicle _Vehicle;
        
        public CaptureCommand(Vehicle vehicle,
                              GameBuilding gameBuilding)
        {
            _Vehicle = vehicle;
            _GameBuilding = gameBuilding;
        }

        public override string Name
        {
            get { return "Capture"; }
        }

        protected override ActionResult Execute(GameTurn turn,
                                                Context context)
        {
            _GameBuilding.Owner = _Vehicle.Owner;
            
            //context.ActionExecutor.Done(turn, false);
            return new ActionResult(0, "");
        }

    }
    
}
